package com.example.musicdemo;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

import androidx.annotation.Nullable;

import com.example.musicdemo.presenter.PlayerPresenter;

/**
 * @类 MusicDemo
 * @作者: 吴金龙
 * @创建时间: 2022/2/25
 * @描述:
 */
public class PlayerService extends Service {
    private PlayerPresenter mPlayerPresenter;

    @Override
    public void onCreate() {
        super.onCreate();
        mPlayerPresenter = new PlayerPresenter();
    }

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return mPlayerPresenter;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        //释放资源
        mPlayerPresenter = null;
    }
}
